package com.cusc.module_monitor_location.mvvm.ui;

import android.view.View;

import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;

import com.cusc.module_monitor_location.BR;
import com.cusc.module_monitor_location.R;
import com.cusc.module_monitor_location.databinding.FragSearchCarBinding;
import com.cusc.module_monitor_location.factory.LocationMonitorModuleFactory;
import com.cusc.module_monitor_location.mvvm.vm.LocationMonitorViewModel;
import com.tcgroup.phone.base_core.framework.mvvm.fragment.BaseMvvmFragment;

/**
 * 作者: wangfei
 * 创建时期: 2020/4/16.
 * 包名: com.cusc.module_monitor_location.mvvm.ui
 * 类名: OSAndroidMvvm
 */
public class SearchCarFragment extends BaseMvvmFragment<FragSearchCarBinding, LocationMonitorViewModel> {


    public static SearchCarFragment newInstance(){
        SearchCarFragment searchCarFragment = new SearchCarFragment();
        return searchCarFragment;
    }

    @Override
    public Class<LocationMonitorViewModel> onBindViewModel() {
        return LocationMonitorViewModel.class;
    }

    @Override
    public LocationMonitorViewModel createViewModel() {
        return ViewModelProviders.of(getActivity(),onBindViewModelFactory()).get(onBindViewModel());
    }

    @Override
    public ViewModelProvider.Factory onBindViewModelFactory() {
        return LocationMonitorModuleFactory.getInstance(getActivity().getApplication());
    }

    @Override
    public void initViewObservable() {

    }

    @Override
    public int onBindVariableId() {
        return BR.model;
    }

    @Override
    public int onBindLayout() {
        return R.layout.frag_search_car;
    }

    @Override
    public String getToolbarTitle() {
        return null;
    }

    @Override
    public void initView(View view) {

    }
}
